/*
Navicat MySQL Data Transfer

Source Server         : 本地数据库
Source Server Version : 50621
Source Host           : localhost:3306
Source Database       : boluomi

Target Server Type    : MYSQL
Target Server Version : 50621
File Encoding         : 65001

Date: 2015-08-20 11:13:24
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for `business`
-- ----------------------------
DROP TABLE IF EXISTS `business`;
CREATE TABLE `business` (
`id`  int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID' ,
`account`  varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '商家账号' ,
`password_hash`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '密码(已加密)' ,
`password_reset_token`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`auth_key`  varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '认证key' ,
`name`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '商家名称' ,
`phone`  varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '联系方式，手机号' ,
`logo`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT 'logo图标路径' ,
`type`  tinyint(1) NULL DEFAULT 1 COMMENT '商家类型 1影楼 2工作室' ,
`province`  varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '省份' ,
`city`  varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '市' ,
`area`  varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '区' ,
`address`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '详细地址' ,
`licence`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '营业执照' ,
`location`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '地图坐标' ,
`share_num`  int(11) NULL DEFAULT 0 COMMENT '分享数量' ,
`read_num`  int(11) NULL DEFAULT 0 COMMENT '阅读数量' ,
`code_url`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '二维码' ,
`status`  tinyint(1) NULL DEFAULT 0 COMMENT '商家状态 -1已删除 0未审批 1已通过' ,
`created_at`  int(11) NULL DEFAULT NULL COMMENT '创建时间' ,
`updated_at`  int(11) NULL DEFAULT NULL COMMENT '修改时间' ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=25

;

-- ----------------------------
-- Records of business
-- ----------------------------
BEGIN;
INSERT INTO `business` VALUES ('7', '13555555555', '$2y$13$9iAIb0n7SopM7AU3Tiq10.AHkgoSxn81SP63eVZQogTtynS3HvXvW', null, 'IkRjc7FIe_M6ImTFk2tREg8AAf92c9qI', '测试商家', null, '', '1', null, null, null, null, null, null, '0', '0', null, '0', '1439608692', '1439781537'), ('8', '13555555556', '$2y$13$9iAIb0n7SopM7AU3Tiq10.AHkgoSxn81SP63eVZQogTtynS3HvXvW', null, 'IkRjc7FIe_M6ImTFk2tREg8AAf92c9qI', '测试商家', null, '', '1', null, null, null, null, null, null, '0', '0', null, '0', '1439608692', '1439781537'), ('9', '13555555557', '$2y$13$9iAIb0n7SopM7AU3Tiq10.AHkgoSxn81SP63eVZQogTtynS3HvXvW', null, 'IkRjc7FIe_M6ImTFk2tREg8AAf92c9qI', '测试商家', null, '', '1', null, null, null, null, null, null, '0', '0', null, '1', '1439608692', '1439781537'), ('10', '13555555558', '$2y$13$9iAIb0n7SopM7AU3Tiq10.AHkgoSxn81SP63eVZQogTtynS3HvXvW', null, 'IkRjc7FIe_M6ImTFk2tREg8AAf92c9qI', '测试商家', null, '', '1', null, null, null, null, null, null, '0', '0', null, '0', '1439608692', '1439781537'), ('11', '13555555559', '$2y$13$9iAIb0n7SopM7AU3Tiq10.AHkgoSxn81SP63eVZQogTtynS3HvXvW', null, 'IkRjc7FIe_M6ImTFk2tREg8AAf92c9qI', '测试商家', null, '', '1', null, null, null, null, null, null, '0', '0', null, '1', '1439608692', '1439781537'), ('12', '13555555550', '$2y$13$9iAIb0n7SopM7AU3Tiq10.AHkgoSxn81SP63eVZQogTtynS3HvXvW', null, 'IkRjc7FIe_M6ImTFk2tREg8AAf92c9qI', '测试商家', null, '', '1', null, null, null, null, null, null, '0', '0', null, '0', '1439608692', '1439781537'), ('13', '13555555561', '$2y$13$9iAIb0n7SopM7AU3Tiq10.AHkgoSxn81SP63eVZQogTtynS3HvXvW', null, 'IkRjc7FIe_M6ImTFk2tREg8AAf92c9qI', '测试商家', null, '', '1', null, null, null, null, null, null, '0', '0', null, '1', '1439608692', '1439781537'), ('14', '13555555562', '$2y$13$9iAIb0n7SopM7AU3Tiq10.AHkgoSxn81SP63eVZQogTtynS3HvXvW', null, 'IkRjc7FIe_M6ImTFk2tREg8AAf92c9qI', '测试商家', null, '', '1', null, null, null, null, null, null, '0', '0', null, '0', '1439608692', '1439781537'), ('15', '13555555563', '$2y$13$9iAIb0n7SopM7AU3Tiq10.AHkgoSxn81SP63eVZQogTtynS3HvXvW', null, 'IkRjc7FIe_M6ImTFk2tREg8AAf92c9qI', '测试商家', null, '', '1', null, null, null, null, null, null, '0', '0', null, '0', '1439608692', '1439781537'), ('16', '13555555564', '$2y$13$9iAIb0n7SopM7AU3Tiq10.AHkgoSxn81SP63eVZQogTtynS3HvXvW', null, 'IkRjc7FIe_M6ImTFk2tREg8AAf92c9qI', '测试商家', null, '', '1', null, null, null, null, null, null, '0', '0', null, '1', '1439608692', '1439781537'), ('17', '13555555565', '$2y$13$9iAIb0n7SopM7AU3Tiq10.AHkgoSxn81SP63eVZQogTtynS3HvXvW', null, 'IkRjc7FIe_M6ImTFk2tREg8AAf92c9qI', '测试商家', null, '', '1', null, null, null, null, null, null, '0', '0', null, '0', '1439608692', '1439781537'), ('18', '13555555566', '$2y$13$9iAIb0n7SopM7AU3Tiq10.AHkgoSxn81SP63eVZQogTtynS3HvXvW', null, 'IkRjc7FIe_M6ImTFk2tREg8AAf92c9qI', '测试商家', null, '', '1', null, null, null, null, null, null, '0', '0', null, '0', '1439608692', '1439781537'), ('19', '13555555567', '$2y$13$9iAIb0n7SopM7AU3Tiq10.AHkgoSxn81SP63eVZQogTtynS3HvXvW', null, 'IkRjc7FIe_M6ImTFk2tREg8AAf92c9qI', '测试商家', null, '', '1', null, null, null, null, null, null, '0', '0', null, '-1', '1439608692', '1439781537'), ('20', '13555555568', '$2y$13$9iAIb0n7SopM7AU3Tiq10.AHkgoSxn81SP63eVZQogTtynS3HvXvW', null, 'IkRjc7FIe_M6ImTFk2tREg8AAf92c9qI', '测试商家', null, '', '1', null, null, null, null, null, null, '0', '0', null, '0', '1439608692', '1439781537'), ('21', '13555555569', '$2y$13$9iAIb0n7SopM7AU3Tiq10.AHkgoSxn81SP63eVZQogTtynS3HvXvW', null, 'IkRjc7FIe_M6ImTFk2tREg8AAf92c9qI', '测试商家', null, '', '1', null, null, null, null, null, null, '0', '0', null, '0', '1439608692', '1439781537'), ('22', '13555555570', '$2y$13$9iAIb0n7SopM7AU3Tiq10.AHkgoSxn81SP63eVZQogTtynS3HvXvW', null, 'IkRjc7FIe_M6ImTFk2tREg8AAf92c9qI', '测试商家', null, '', '1', null, null, null, null, null, null, '0', '0', null, '0', '1439608692', '1439781537'), ('23', '13555555571', '$2y$13$9iAIb0n7SopM7AU3Tiq10.AHkgoSxn81SP63eVZQogTtynS3HvXvW', null, 'IkRjc7FIe_M6ImTFk2tREg8AAf92c9qI', '测试商家', null, '', '1', null, null, null, null, null, null, '0', '0', null, '0', '1439608692', '1439781537'), ('24', '13555555572', '$2y$13$9iAIb0n7SopM7AU3Tiq10.AHkgoSxn81SP63eVZQogTtynS3HvXvW', null, 'IkRjc7FIe_M6ImTFk2tREg8AAf92c9qI', '测试商家', null, '', '1', null, null, null, null, null, null, '0', '0', null, '-1', '1439608692', '1439781537');
COMMIT;

-- ----------------------------
-- Table structure for `migration`
-- ----------------------------
DROP TABLE IF EXISTS `migration`;
CREATE TABLE `migration` (
`version`  varchar(180) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`apply_time`  int(11) NULL DEFAULT NULL ,
PRIMARY KEY (`version`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci

;

-- ----------------------------
-- Records of migration
-- ----------------------------
BEGIN;
INSERT INTO `migration` VALUES ('m000000_000000_base', '1439102959'), ('m130524_201442_init', '1439102961');
COMMIT;

-- ----------------------------
-- Table structure for `product`
-- ----------------------------
DROP TABLE IF EXISTS `product`;
CREATE TABLE `product` (
`id`  int(11) NOT NULL AUTO_INCREMENT COMMENT '主键' ,
`title`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '作品名称' ,
`banner_pic`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '封面图' ,
`description`  varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '描述' ,
`is_brand`  tinyint(1) NULL DEFAULT 0 COMMENT '是否显示品牌 0否 1是' ,
`is_home`  tinyint(1) NULL DEFAULT 0 COMMENT '是否显示商家主页 0否 1是' ,
`music`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '背景音乐路径' ,
`change_status`  tinyint(1) NULL DEFAULT 1 COMMENT '页面切换 1上下切换 2折叠切换 3立体切换' ,
`pics`  text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '上传图片 多个图片使用逗号分隔' ,
`share_num`  int(11) NULL DEFAULT 0 COMMENT '分享数量' ,
`read_num`  int(11) NULL DEFAULT 0 COMMENT '阅读数量' ,
`code_url`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '二维码' ,
`sort`  int(10) NULL DEFAULT 1 COMMENT '排序' ,
`status`  tinyint(1) NULL DEFAULT 0 COMMENT '商家状态 -1已删除 0未审批 1已通过' ,
`businessId`  int(11) NOT NULL COMMENT '商家ID' ,
`created_at`  int(11) NULL DEFAULT NULL COMMENT '创建时间' ,
`updated_at`  int(11) NULL DEFAULT NULL COMMENT '修改时间' ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=18

;

-- ----------------------------
-- Records of product
-- ----------------------------
BEGIN;
INSERT INTO `product` VALUES ('1', '产品1号', null, '产品1号描述', '0', '0', null, '1', null, '0', '0', null, '1', '0', '7', null, null), ('2', '产品2号', null, '产品2号描述', '0', '0', null, '1', null, '0', '0', null, '1', '0', '7', null, null), ('3', '产品3号', null, '产品3号描述', '0', '0', null, '1', null, '0', '0', null, '1', '0', '7', null, null), ('4', '产品4号', null, '产品4号描述', '0', '0', null, '1', null, '0', '0', null, '1', '0', '7', null, null), ('5', '产品5号', null, '产品5号描述', '0', '0', null, '1', null, '0', '0', null, '1', '0', '7', null, null), ('6', '产品6号', null, '产品6号描述', '0', '0', null, '1', null, '0', '0', null, '1', '0', '7', null, null), ('7', '产品7号', null, '产品7号描述', '0', '0', null, '1', null, '0', '0', null, '1', '0', '7', null, null), ('8', '产品8号', null, '产品8号描述', '0', '0', null, '1', null, '0', '0', null, '1', '0', '8', null, null), ('9', '产品9号', null, '产品9号描述', '0', '0', null, '1', null, '0', '0', null, '1', '0', '8', null, null), ('10', '产品10号', null, '产品10号描述', '0', '0', null, '1', null, '0', '0', null, '1', '0', '9', null, null), ('11', '产品11号', null, '产品11号描述', '0', '0', null, '1', null, '0', '0', null, '1', '0', '7', null, null), ('12', '产品12号', null, '产品12号描述', '0', '0', null, '1', null, '0', '0', null, '1', '0', '7', null, null), ('13', '产品13号', null, '产品13号描述', '0', '0', null, '1', null, '0', '0', null, '1', '0', '7', null, null), ('14', '产品14号', null, '产品14号描述', '0', '0', null, '1', null, '0', '0', null, '1', '0', '9', null, null), ('15', '产品15号', null, '产品15号描述', '0', '0', null, '1', null, '0', '0', null, '1', '0', '9', null, null), ('16', '产品16号', null, '产品16号描述', '0', '0', null, '1', null, '0', '0', null, '1', '0', '7', null, null), ('17', '产品17号', null, '产品17号描述', '0', '0', null, '1', null, '0', '0', null, '1', '0', '7', null, null);
COMMIT;

-- ----------------------------
-- Table structure for `user`
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`username`  varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
`auth_key`  varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
`password_hash`  varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
`password_reset_token`  varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL ,
`email`  varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL ,
`status`  smallint(6) NOT NULL DEFAULT 10 ,
`created_at`  int(11) NOT NULL ,
`updated_at`  int(11) NOT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=4

;

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES ('1', 'admin', 'mY6DwqC1P9l93kaqjShwbK_zxLN40scY', '$2y$13$N6ucgI9E6gYlHpqkM3v.q.ORlW6OXyoe2vYwIVeilZZjrxWR59AQy', null, 'admin@163.com', '10', '1439104710', '1439104710'), ('2', 'test', 'QdFsA_7FZcQXuKOmOS9MX6pX0nccI07F', '$2y$13$jrG62b7KEs2QwTI8edNhxu8Pch4Efvh8pNFf/ob4S5fGYRSMZxTti', null, 'test@163.com', '10', '1439110257', '1439110257'), ('3', '13555555555', 'moLJldhcioRSI7omiON9XONsZEHxeTMv', '$2y$13$1ow.9SLXSgbMDXTRMGJqbutQWtbMhLYksiB.8WH/eExKXHHAJdRlS', null, '', '10', '1439383032', '1439470359');
COMMIT;

-- ----------------------------
-- Auto increment value for `business`
-- ----------------------------
ALTER TABLE `business` AUTO_INCREMENT=25;

-- ----------------------------
-- Auto increment value for `product`
-- ----------------------------
ALTER TABLE `product` AUTO_INCREMENT=18;

-- ----------------------------
-- Auto increment value for `user`
-- ----------------------------
ALTER TABLE `user` AUTO_INCREMENT=4;


alter table business add url varchar(200) DEFAULT '' COMMENT '商家链接';

CREATE TABLE `code` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `mobile` varchar(11) NOT NULL COMMENT '手机号',
  `type` varchar(11) DEFAULT 'Login' COMMENT '类型',
  `code` int(11) NOT NULL COMMENT '验证码',
  `created_at` bigint(11) NOT NULL COMMENT '创建时间戳',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

